package com.ktjy.member.domain;

import lombok.Data;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ktjy.common.annotation.Excel;
import com.ktjy.common.core.domain.BaseEntity;

/**
 * 购物车信息对象 t_cart
 *
 * @author ktjy
 * @date 2025-03-17
 */
@Data
@TableName("t_cart")
public class Cart extends BaseEntity {
private static final long serialVersionUID=1L;

        /** 主键id */
                @Excel(name = "主键id")
            @TableId(value = "id" , type = IdType.AUTO)
        private Long id;

        /** 微信用户id */
                @Excel(name = "微信用户id")
            @TableField(value = "user_id")
        private Long userId;

        /** 外键id */
                @Excel(name = "外键id")
            @TableField(value = "sku_id")
        private String skuId;

        /** 数量 */
                @Excel(name = "数量")
            @TableField(value = "goods_count")
        private Long goodsCount;

        /** 选中状态：0表示false未选中，1表示true选中 */
            @TableField(value = "selected")
        private Integer selected;

        /** 状态 */
            @TableField(value = "enabled")
        private Integer enabled;

        @TableField(exist = false)
        private String userName;

        @TableField(exist = false)
        private double price;

        @TableField(exist = false)
        private String goodsName;


@Override
public String toString(){
    return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
        .append("id" ,getId())
        .append("userId" ,getUserId())
        .append("skuId" ,getSkuId())
        .append("goodsCount" ,getGoodsCount())
        .append("selected" ,getSelected())
        .append("enabled" ,getEnabled())
        .append("createTime" ,getCreateTime())
        .append("updateTime" ,getUpdateTime())
        .append("createBy" ,getCreateBy())
        .append("updateBy" ,getUpdateBy())
        .append("userName" ,getUserName())
        .append("goodsName" ,getGoodsName())
        .append("price" ,getPrice())
            .toString();
}
        }